//
//  NetworkTool.h
//  XHH_networkTool
//
//  Created by xiaohuihui on 2016/11/26.
//  Copyright © 2016年 30-陈辉华. All rights reserved.
//

#import <AFNetworking/AFHTTPSessionManager.h>
#import <JWTAlgorithmFactory.h>

@interface NetworkTool: AFHTTPSessionManager

/**
 创建网络请求工具类的单例
 */
+ (instancetype)sharedTool;

/**
 创建请求方法
 */
- (void)requestWithName:(NSString *)name
              URLString:(NSString *)URLString
             parameters:(id)parameters
                 method:(NSString *)method
               callBack:(void(^)(id responseObject))callBack;

/**上传视频到服务器*/
- (void)uploadVideoForPath:(NSURL *)videoPath
				  callBack:(void(^)(id responseObject))callBack;

- (void)uploadImage:(UIImage *)img
		   callBack:(void(^)(id responseObject))callBack;

/**新增一个封装包含有错误的回调的*/
- (void)requestWithName:(NSString *)name
			  URLString:(NSString *)URLString
			 parameters:(id)parameters
				 method:(NSString *)method
			   callBack:(void(^)(id responseObject))callBack
		   failCallBack:(void(^)(id responseObject))failCallBack;

@end
